package MainPackage 
{
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
  import lastfm.Auth;
  import vk.RemoteVars;
	
	/**
   * ...
   * @author ...
   */
  public class BindableSettings extends EventDispatcher 
  {
    [Bindable]
    public var scrobblingEnabled:Boolean;
    
    public function BindableSettings(target:IEventDispatcher=null) 
    {
      super(target);
      scrobblingEnabled = false;
    }
    
    public function update():void
    {
      var enabled:int = int(RemoteVars.getVar(RemoteVars.SCROBBLING_ENABLED));
      scrobblingEnabled = (0 != enabled && 0 < Auth._sessionKey.length);
    }
    
  }

}